//
//  LoginController.m
//  carowner
//
//  Created by 孙可 on 2019/5/10.
//  Copyright © 2019年 ggj. All rights reserved.
//

#import "LoginController.h"
#import "AppDelegate.h"

@interface LoginController ()


@end

@implementation LoginController


-(void)viewDidLoad{
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIButton * loginBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    loginBtn.backgroundColor = themeColor;
    [loginBtn setTitle:@"登陆" forState:UIControlStateNormal];
    [loginBtn setTintColor:[UIColor whiteColor]];
    [loginBtn addTarget:self action:@selector(goLogin) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:loginBtn];
    
    [loginBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.centerY.equalTo(self.view);
        make.size.mas_equalTo(CGSizeMake(100, 50));
    }];
    
}

-(void)goLogin{
    [(AppDelegate *)[UIApplication sharedApplication].delegate setMainRoot];
}


@end
